<%= render 'base' %>

<div id="cpanel_locations">
  <table class="table table-bordered table-striped table-condensed">
    <tr class="head">
      <td>#</td>
      <td>地名</td>
      <td>会员数</td>
      <td class="opts"></td>
    </tr>
    <% @locations.each do |item| %>
    <tr class="<%= cycle("","even") %>">
      <td><%= item.id %></td>
      <td><%= item.name %></td>
      <td><%= item.users_count %></td>
      <td>
        <%= link_to "", edit_cpanel_location_path(item.id), class: "fa fa-pencil" %>
        <%= link_to "", cpanel_location_path(item.id), method: :delete, 'data-confirm' => '确定要删除吗?', class: "fa fa-trash" %>
      </td>
    </tr>
    <% end %>
  </table>
  <%= will_paginate @locations %>
</div>
